import { Component } from '@angular/core';
import { _HttpClient } from '@delon/theme';
import { SimpleGeneralcListComponent } from '../dynamic/list/general.list.component';

@Component({
  selector: 'app-simple-list',
  templateUrl: '../dynamic/list/general.list.component.html',
})
export class SimpleActionComponent extends SimpleGeneralcListComponent {
  getCode() {
    return 'simple_action';
  }

  add() {
    this.modal.createStatic(this.editComponent, { i: {} }).subscribe(() => this.st.reload());
  }

  edit(record: any) {
    this.modal.createStatic(this.editComponent, { i: record }).subscribe(() => this.st.reload());
  }
}
